Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(switch): enhances Switch component to allow inline variant in new validation redesign #7023

Merged
merged 2 commits into from
Nov 7, 2024

Conversation

damienrobson-sage
Copy link
Contributor

@damienrobson-sage damienrobson-sage commented Oct 17, 2024

Proposed behaviour

Adds the following enhancements to the Switch component:

  • Inline error style with the new error
  • Dark background variant

This will allow the inline option to work alongside the validationRedesignOptIn flag. If the inline layout does not fit the space provided, it will default to the vertical style layout.

Current behaviour

The Switch component does not currently support inline layouts if the validationRedesignOptIn flag is set to true

Checklist

  • Commits follow our style guide
  • Related issues linked in commit messages if required
  • Screenshots are included in the PR if useful
  • All themes are supported if required
  • Unit tests added or updated if required
  • Playwright automation tests added or updated if required
  • Storybook added or updated if required
  • Translations added or updated (including creating or amending translation keys table in storybook) if required
  • Typescript d.ts file added or updated if required
  • Related docs have been updated if required

QA

  • Tested in provided StackBlitz sandbox/Storybook
  • Add new Playwright test coverage if required
  • Carbon implementation matches Design System/designs
  • UI Tests GitHub check reviewed if required

Additional context

Testing instructions

edleeks87
edleeks87 previously approved these changes Oct 24, 2024
edleeks87
edleeks87 previously approved these changes Oct 25, 2024
@edleeks87 edleeks87 marked this pull request as ready for review October 25, 2024 12:42
@edleeks87 edleeks87 requested review from a team as code owners October 25, 2024 12:42
@damienrobson-sage damienrobson-sage force-pushed the FE-6780-inline-switch branch 2 times, most recently from e2aa03b to 69c6630 Compare October 29, 2024 10:23
@harpalsingh
Copy link
Member

Looks good to me, wanted to add there is a minor alignment review we need to look at the inline layout but its rendering slightly different in different browsers so that will not impact this ticket.

edleeks87
edleeks87 previously approved these changes Oct 30, 2024
@damienrobson-sage damienrobson-sage force-pushed the FE-6780-inline-switch branch 2 times, most recently from 785bbb4 to ba04c3b Compare October 30, 2024 16:01
@damienrobson-sage damienrobson-sage merged commit 8ae08ac into master Nov 7, 2024
24 checks passed
@damienrobson-sage damienrobson-sage deleted the FE-6780-inline-switch branch November 7, 2024 09:52
@carbonci
Copy link
Collaborator

carbonci commented Nov 7, 2024

🎉 This PR is included in version 144.5.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

6 participants